package com.sfeir.tv.client.ui.search;

import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Event;
import com.sfeir.tv.client.mvc.framework.AppEvent;
import com.sfeir.tv.client.mvc.framework.Model;
import com.sfeir.tv.client.mvc.framework.impl.gwt.GWTVerticalPanel;

public class ListView extends GWTVerticalPanel {

	public ListView() {
		this("list-" + System.currentTimeMillis());
	}

	public ListView(String id) {
		super(id);
	}

	public void refreshView(Model model) {
	}

	public void fireEvent(int eventType) {
	}
	
	public void deselectWidget(int index) {
		getWidget(index).setStyleName("searcItem_deselected");
	}
	public void selectWidget(int index) {
		getWidget(index).setStyleName("searcItem_selected");
	}
    public void onGWTBrowserEvent( Event event )
    {
        if (DOM.eventGetType(event) == Event.ONMOUSEDOWN) {
            fireEvent( AppEvent.CLICK_EVENT );
        } 
    }

    //========================================================
    public void dispose()
    {
        // TODO Auto-generated method stub
        
    }

    public boolean isDisposed()
    {
        // TODO Auto-generated method stub
        return false;
    }

    public void doInit()
    {
        // TODO Auto-generated method stub
        
    }

    public void init()
    {
        // TODO Auto-generated method stub
        
    }

    public void post()
    {
        // TODO Auto-generated method stub
        
    }

    public void pre()
    {
        // TODO Auto-generated method stub
        
    }

}
